package errcode

// 统一管理错误码

var (
	OK                   = &ErrCode{Code: 0, Message: "success!"}
	InternalServerError  = &ErrCode{1001, "Internal server error!"}
	ParamBindError       = &ErrCode{1002, "param bind fail!"}
	DataBaseError        = &ErrCode{1003, "database operate fail!"}
	AuthFailError        = &ErrCode{1004, "bcrypt password error!"}
	NoSuchUser           = &ErrCode{1005, " no such user"}
	PasswordAuthFail     = &ErrCode{1006, "password auth failure!"}
	TokenGenerateError   = &ErrCode{1007, "token generate error!"}
	ValidateTokenError   = &ErrCode{1008, "validate token error!"}
	UserRegisterFail     = &ErrCode{1009, "注册失败，用户已存在"}
	SearchError          = &ErrCode{1010, "data search fail!"}
	DataValidatorError   = &ErrCode{1011, "data validator error!"}
	WriteError           = &ErrCode{1012, "data write fail!"}
	ParamTypeError       = &ErrCode{1013, "Param type error!"}
	DeleteError          = &ErrCode{1014, "data delete fail!"}
	UpdateError          = &ErrCode{1015, "data update fail!"}
	InternalError        = &ErrCode{1016, "data insert database error!"}
	ErrcodeInternalError = &ErrCode{1017, "get token from gin.context error"}
	InvalidParams        = &ErrCode{1017, "invalid params from request"}
)
